package satir.testcase.framework;

import junit.framework.TestCase;

import org.junit.Test;

import satir.card.Card;
import satir.command.Command;
import satir.framework.LazyInitiator;

public class LazyInitiator_getCard_1 extends TestCase{
	
	//Step 1, Create a SayCard
	@Test
	public void testGetCommandStep1() {
		Card card = LazyInitiator.getCard("SayCard", "SayCard1");		
		assertNotNull(card);
	}

	//Step 2, Create an ActCard
	@Test
	public void testGetCommandStep2() {
		Card card = LazyInitiator.getCard("ActCard", "ActCard1");		
		assertNotNull(card);
	}

	//Step 3, Create an EventCard
	@Test
	public void testGetCommandStep3() {
		Card card = LazyInitiator.getCard("EventCard", "EventCard1");		
		assertNotNull(card);
	}
	
	//Step 4, Create an AccomplishToolCard
	@Test
	public void testGetCommandStep4() {
		Card card = LazyInitiator.getCard("AccomplishToolCard", "AtCard1");		
		assertNotNull(card);
	}
	
	//Step 5, Create a SkipToolCard
	@Test
	public void testGetCommandStep5() {
		Card card = LazyInitiator.getCard("SkipToolCard", "SkipCard1");		
		assertNotNull(card);
	}
	
	//Step 6, Get the same instance from pool
	@Test
	public void testGetCommandStep6() {
		Card card = LazyInitiator.getCard("SkipToolCard", "SkipCard1");
		Card card2 = LazyInitiator.getCard("SkipToolCard", "SkipCard1");
		assertEquals(card, card2);
	}

}
